package com.frxuexi.lib_http

import retrofit2.Retrofit

class NetWorkFactory {
    companion object{
        lateinit var retrofit: Retrofit
        val noneRetrofit=NoneRetrofitImpl().createRetrofit()
        val tokenRetrofit=TokenRetrofitImpl().createRetrofit()
        fun factory(type:HttpType):Retrofit{
            when(type){
                HttpType.NONE->{
                    retrofit = noneRetrofit
                }
                HttpType.TOKEN->{
                    retrofit= tokenRetrofit
                }
                HttpType.SIGN->{

                }
                HttpType.TOKENSIGN->{

                }
            }
            return retrofit
        }
    }
}